import { POST as post, GET as get } from '../axios.config.js'

const base = config.ip
const projectName = '/rcdg-logictics'

// -----------------物品领用--------------
// 获取办公用品申报列表
export const getlistLogicticsApplys = p => get(`${base}${projectName}/logictics-info/listLogicticsApplys`, p)
// 获取新增表单的详情信息
export const getAddDetailInfo = p => get(`${base}${projectName}/logictics-info/getAddDetailInfo`, p)
// 新增申领单
export const addLogicticsInfo = p => post(`${base}${projectName}/logictics-info/addLogicticsInfo`, p)
// 删除申领单
export const delLogicticsInfo = p => post(`${base}${projectName}/logictics-info/delLogicticsInfo`, p)
// 获取申领单详情
export const getLogicticsInfoDetail = p => get(`${base}${projectName}/logictics-info/getLogicticsInfoDetail`, p)
// 获取审批记录列表:页面右侧流程图
export const getFlowApproveList = p => get(`${base}${projectName}/logictics-info/getFlowApproveList`, p)
// 判断是否有新增权限
export const checkAddAuthority = p => get(`${base}${projectName}/logictics-info/checkAddAuthority`, p)
// 获取审批列表
export const getlistLogicticsConfirm = p => get(`${base}${projectName}/logictics-info/listLogicticsConfirm`, p)
// 编辑申领单
export const updateLogicticsInfo = p => post(`${base}${projectName}/logictics-info/updateLogicticsInfo`, p)
// 审批表单:通过/不通过
export const approveForm = p => post(`${base}${projectName}/logictics-info/approveForm`, p)
// 批量确定(批量审批通过)
export const approveBatch = p => post(`${base}${projectName}/logictics-info/approveBatch`, p)
// 获取窗口列表
export const getWindowList = p => get(`${base}${projectName}/logictics-info/getWindowList`, p)
// 获取统计数据
export const getStatisticsList = p => get(`${base}${projectName}/logictics-info/getStatisticsList`, p)
// 【汇总统计列表导出excel】
export const exportCollectExcel = p => `${base}${projectName}/logictics-info/skipValidation/exportCollectExcel${p}`
// 下载模板
export const exportLogicticsInfo = p => `${base}${projectName}/logictics-info/skipValidation/exportLogicticsInfo${p}`
// 校验是否有可审批的表单[批量确定]
export const checkBatchConfirmAuthority = p =>
  post(`${base}${projectName}/logictics-info/checkBatchConfirmAuthority`, p)

// --------------报修维修--------------
// 【获取报修表单申报列表】
export const getlistRepairApplys = p => get(`${base}${projectName}/sa-repair/listRepairApplys`, p)

// 【获取报修审核列表】
export const getlistRepairConfirm = p => get(`${base}${projectName}/sa-repair/listRepairConfirm`, p)

// 【获取报修单详情】
export const getRepairDetail = p => get(`${base}${projectName}/sa-repair/getRepairDetail`, p)

// 【获取审批记录列表:页面右侧流程图】报修维修
export const getFlowApproveListRepair = p => get(`${base}${projectName}/sa-repair/getFlowApproveList`, p)

// 【新增报修单】
export const addRepair = p => post(`${base}${projectName}/sa-repair/addRepair`, p)

// 【审批表单:通过/不通过】
export const submitapproveForm = p => post(`${base}${projectName}/sa-repair/approveForm`, p)

// 【获取有报修单数据的部门列表】
export const getOrgList = p => get(`${base}${projectName}/sa-repair/getOrgList`, p)

// 【获取汇总统计列表】
export const getStatisticList = p => get(`${base}${projectName}/sa-repair/getStatisticList`, p)

// 【更新完成状态】
export const updateCompletedStatus = p => post(`${base}${projectName}/sa-repair/updateCompletedStatus`, p)

// 【汇总统计列表导出excel】
export const exportExcel = p => `${base}${projectName}/sa-repair/skipValidation/exportExcel${p}`

// 【获取年份和月份列表】
export const getYearMonthList = p => get(`${base}${projectName}/sa-repair/getYearMonthList`, p)

// --------------周末值班--------------

// 【获取预值班表列表】
export const getlistPreWeekendDuty = p => get(`${base}${projectName}/sa-weekend-duty/listPreWeekendDuty`, p)

// 【根据机构id查询人员列表】
export const getUserListByOrgId = p => get(`${base}${projectName}/sa-weekend-duty/getUserListByOrgId`, p)

// 【获取预值班详情】
export const getPreWeekendDutyDetail = p => get(`${base}${projectName}/sa-weekend-duty/getPreWeekendDutyDetail`, p)

// 【获取值班确认表列表】
export const getlistWeekendDuty = p => get(`${base}${projectName}/sa-weekend-duty/listWeekendDuty`, p)

// 【获取值班确认详情】
export const getWeekendDutyDetail = p => get(`${base}${projectName}/sa-weekend-duty/getWeekendDutyDetail`, p)

// 【获取误餐补助审批单列表】
export const getlistWeekendDutySubsidy = p => get(`${base}${projectName}/sa-weekend-duty/listWeekendDutySubsidy`, p)

// 【获取误餐补助审批单详情】
export const getWeekendDutySubsidyDetail = p =>
  get(`${base}${projectName}/sa-weekend-duty/getWeekendDutySubsidyDetail`, p)

// 【暂存/提交预值班表】
export const submitaddPreWeekendDuty = p => post(`${base}${projectName}/sa-weekend-duty/addPreWeekendDuty`, p)

// 【提交值班确认表】
export const submitWeekendDuty = p => post(`${base}${projectName}/sa-weekend-duty/submitWeekendDuty`, p)

// 【获取补助汇总列表】
export const getSubsidyCollectList = p => get(`${base}${projectName}/sa-weekend-duty/getSubsidyCollectList`, p)

// 【更新补助标准】
export const updateSubsidyStandard = p => post(`${base}${projectName}/sa-weekend-duty/updateSubsidyStandard`, p)

// 【导出周末轮岗值班表】
export const exportWeekendDutyExcel = p =>
  `${base}${projectName}/sa-weekend-duty/skipValidation/exportWeekendDutyExcel${p}`

// 【导出补助公示表】
export const exportSubsidyNotice = p => `${base}${projectName}/sa-weekend-duty/skipValidation/exportSubsidyNotice${p}`

// 【导出补助发放表】
export const exportSubsidyGrant = p => `${base}${projectName}/sa-weekend-duty/skipValidation/exportSubsidyGrant${p}`

// 【导出误餐补助审批单】
export const exportSubsidyConfirm = p => `${base}${projectName}/sa-weekend-duty/skipValidation/exportSubsidyConfirm${p}`

// 【获取人员打卡信息】
export const getUserPunchInfo = p => get(`${base}${projectName}/sa-weekend-duty/getUserPunchInfo`, p)

// 【审核操作：退回】
export const returnWeekendDuty = p => post(`${base}${projectName}/sa-weekend-duty/returnWeekendDuty`, p)

// --------------卡号管理--------------

// 【获取卡号信息列表】
export const getlistCardInfoManage = p => get(`${base}${projectName}/sa-card-manage/listCardInfoManage`, p)

// 【获取机构列表】
export const getOrgListBank = p => get(`${base}${projectName}/sa-card-manage/getOrgList`, p)

// 【新增/编辑卡号信息】
export const addCardInfo = p => post(`${base}${projectName}/sa-card-manage/addCardInfo`, p)

// 【获取卡号详情】
export const getCardInfoDetail = p => get(`${base}${projectName}/sa-card-manage/getCardInfoDetail`, p)

// 【删除卡号信息】
export const deleteCardInfo = p => post(`${base}${projectName}/sa-card-manage/deleteCardInfo`, p)

// 【下载银行卡号模板】
export const exportCardTemplate = p => `${base}${projectName}/sa-card-manage/skipValidation/exportCardTemplate${p}`

// 【批量导入银行卡号信息】
export const importCardInfo = p => post(`${base}${projectName}/sa-card-manage/importCardInfo`, p)

// 数据信息导入-数据识别
export const uploadCardInfo = p => post(`${base}${projectName}/sa-card-manage/uploadCardInfo`, p)

// ------------出差报销----------------

// 【获取所有人员列表】
export const getAllUserList = p => get(`${base}${projectName}/sa-trip-reimburse/getAllUserList`, p)

// 【获取审批单申报列表】
export const getlistTripReimburseApplys = p => get(`${base}${projectName}/sa-trip-reimburse/listTripReimburseApplys`, p)

// 【获取审批单审核列表】
export const getlistTripReimburseConfirm = p =>
  get(`${base}${projectName}/sa-trip-reimburse/listTripReimburseConfirm`, p)

// 【获取审批单详情】
export const getTripReimburseDetail = p => get(`${base}${projectName}/sa-trip-reimburse/getTripReimburseDetail`, p)

// 【获取审批记录列表:页面右侧流程图】
export const getFlowApproveListExpense = p =>
  get(`${base}${projectName}/sa-trip-reimburse/getFlowApproveList`, p, {
    headers: {
      hideLoading: true,
    },
  })

// 【新增审批单】
export const addTripReimburse = p => post(`${base}${projectName}/sa-trip-reimburse/addTripReimburse`, p)

// 【编辑审批单】
export const updateTripReimburse = p => post(`${base}${projectName}/sa-trip-reimburse/updateTripReimburse`, p)

// 【审批表单:通过/不通过】
export const approveFormExpense = p => post(`${base}${projectName}/sa-trip-reimburse/approveForm`, p)

// 【填写用车信息】
export const addVehicleInfo = p => post(`${base}${projectName}/sa-trip-reimburse/addVehicleInfo`, p)

// 【导出出差审批表】
export const exportTripReimburseDoc = p =>
  `${base}${projectName}/sa-trip-reimburse/skipValidation/exportTripReimburseDoc${p}`

// 【导出零星报销单】
export const exportLingxingExcel = p => `${base}${projectName}/sa-trip-reimburse/skipValidation/exportLingxingExcel${p}`

// 【导出差旅费报销单】
export const exportTripExpenseExcel = p =>
  `${base}${projectName}/sa-trip-reimburse/skipValidation/exportTripExpenseExcel${p}`

// 【查询审批通过的出差前审批单列表】
export const getlistPassTripReimburse = p => get(`${base}${projectName}/sa-trip-reimburse/listPassTripReimburse`, p)

// 【校验出差审批单是否可以被关联】
export const checkIsCanRelated = p => get(`${base}${projectName}/sa-trip-reimburse/checkIsCanRelated`, p)

// 【获取机构负责人】
export const getOrgLeader = p => get(`${base}${projectName}/sa-trip-reimburse/getOrgLeader`, p)
